package com.jinkeen.xiaxie.rxKotlin

import android.os.Bundle
import com.jinkeen.xiaxie.base.BaseActivity
import rx.Observable
import rx.Subscriber

/**
 * @description: TODO
 * @author whz
 * @date 2021/12/31 10:59
 * @version 1.0
 */

class RxKotlinTestActivity : BaseActivity() {

    override fun onCreate(savedInstanceState: Bundle?) {
        super.onCreate(savedInstanceState)
    }

    private fun ob() {
        Observable.create<String> {
            it.onNext("Hello Rx!")
            it.onNext("hello Rx")
            it.onCompleted()
        }.subscribe(object : Subscriber<String>() {
            override fun onNext(t: String) {

            }

            override fun onError(e: Throwable?) {

            }

            override fun onCompleted() {

            }
        })

        Observable.just(1,1.0,"String",true).subscribe(object: Subscriber<Any>(){
            override fun onCompleted() {

            }

            override fun onError(e: Throwable?) {

            }

            override fun onNext(t: Any?) {

            }

        })

        

    }
}